package com.dominator.utils.api;

import com.dominator.enums.ReqEnums;
import com.dominator.utils.encode.Des3Utils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

@Getter
@Setter
@ToString
public class SocketMessage implements Serializable {

    String code;
    String message;
    String data;
    String service;
    String method;


    public SocketMessage(ReqEnums reqEnums, Object object, String service,String method){
        this.code=reqEnums.getCode();
        this.message=reqEnums.getMsg();
        if (object !=null){
            this.data = Des3Utils.encResponse(object);
        }
        this.service =service;
        this.method =method;
    }
}
